3.9 \(\int \csc ^2(2 a+2 b x) \sin (a+b x) \, dx\)

Optimal. Leaf size=28 \[ \frac {\sec (a+b x)}{4 b}-\frac {\tanh ^{-1}(\cos (a+b x))}{4 b} \]

[Out]

-1/4*arctanh(cos(b*x+a))/b+1/4*sec(b*x+a)/b

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4288, 2622, 321, 207} \[ \frac {\sec (a+b x)}{4 b}-\frac {\tanh ^{-1}(\cos (a+b x))}{4 b} \]

Antiderivative was successfully verified.

[In]

Int[Csc[2*a + 2*b*x]^2*Sin[a + b*x],x]

[Out]

-ArcTanh[Cos[a + b*x]]/(4*b) + Sec[a + b*x]/(4*b)

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2622

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 4288

Int[((f_.)*sin[(a_.) + (b_.)*(x_)])^(n_.)*sin[(c_.) + (d_.)*(x_)]^(p_.), x_Symbol] :> Dist[2^p/f^p, Int[Cos[a
+ b*x]^p*(f*Sin[a + b*x])^(n + p), x], x] /; FreeQ[{a, b, c, d, f, n}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2]
&& IntegerQ[p]

Rubi steps

\begin {align*} \int \csc ^2(2 a+2 b x) \sin (a+b x) \, dx &=\frac {1}{4} \int \csc (a+b x) \sec ^2(a+b x) \, dx\\ &=\frac {\operatorname {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{4 b}\\ &=\frac {\sec (a+b x)}{4 b}+\frac {\operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{4 b}\\ &=-\frac {\tanh ^{-1}(\cos (a+b x))}{4 b}+\frac {\sec (a+b x)}{4 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 50, normalized size = 1.79 \[ \frac {\sec (a+b x)}{4 b}+\frac {\log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )}{4 b}-\frac {\log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )}{4 b} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[2*a + 2*b*x]^2*Sin[a + b*x],x]

[Out]

-1/4*Log[Cos[(a + b*x)/2]]/b + Log[Sin[(a + b*x)/2]]/(4*b) + Sec[a + b*x]/(4*b)

________________________________________________________________________________________

fricas [B]  time = 0.45, size = 52, normalized size = 1.86 \[ -\frac {\cos \left (b x + a\right ) \log \left (\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) - \cos \left (b x + a\right ) \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) - 2}{8 \, b \cos \left (b x + a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)^2*sin(b*x+a),x, algorithm="fricas")

[Out]

-1/8*(cos(b*x + a)*log(1/2*cos(b*x + a) + 1/2) - cos(b*x + a)*log(-1/2*cos(b*x + a) + 1/2) - 2)/(b*cos(b*x + a
))

________________________________________________________________________________________

giac [B]  time = 2.37, size = 412, normalized size = 14.71 \[ -\frac {\frac {2 \, {\left (6 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right )^{11} - \tan \left (\frac {1}{2} \, a\right )^{12} - 2 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right )^{9} + 12 \, \tan \left (\frac {1}{2} \, a\right )^{10} - 36 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right )^{7} + 27 \, \tan \left (\frac {1}{2} \, a\right )^{8} - 36 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right )^{5} - 2 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right )^{3} - 27 \, \tan \left (\frac {1}{2} \, a\right )^{4} + 6 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right ) - 12 \, \tan \left (\frac {1}{2} \, a\right )^{2} + 1\right )}}{{\left (\tan \left (\frac {1}{2} \, b x + 2 \, a\right )^{2} \tan \left (\frac {1}{2} \, a\right )^{6} - 15 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right )^{2} \tan \left (\frac {1}{2} \, a\right )^{4} + 12 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right )^{5} - \tan \left (\frac {1}{2} \, a\right )^{6} + 15 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right )^{2} \tan \left (\frac {1}{2} \, a\right )^{2} - 40 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right )^{3} + 15 \, \tan \left (\frac {1}{2} \, a\right )^{4} - \tan \left (\frac {1}{2} \, b x + 2 \, a\right )^{2} + 12 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right ) - 15 \, \tan \left (\frac {1}{2} \, a\right )^{2} + 1\right )} {\left (\tan \left (\frac {1}{2} \, a\right )^{6} - 15 \, \tan \left (\frac {1}{2} \, a\right )^{4} + 15 \, \tan \left (\frac {1}{2} \, a\right )^{2} - 1\right )}} + \log \left ({\left | \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right )^{3} - 3 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right ) + 3 \, \tan \left (\frac {1}{2} \, a\right )^{2} - 1 \right |}\right ) - \log \left ({\left | 3 \, \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) \tan \left (\frac {1}{2} \, a\right )^{2} - \tan \left (\frac {1}{2} \, a\right )^{3} - \tan \left (\frac {1}{2} \, b x + 2 \, a\right ) + 3 \, \tan \left (\frac {1}{2} \, a\right ) \right |}\right )}{4 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)^2*sin(b*x+a),x, algorithm="giac")

[Out]

-1/4*(2*(6*tan(1/2*b*x + 2*a)*tan(1/2*a)^11 - tan(1/2*a)^12 - 2*tan(1/2*b*x + 2*a)*tan(1/2*a)^9 + 12*tan(1/2*a
)^10 - 36*tan(1/2*b*x + 2*a)*tan(1/2*a)^7 + 27*tan(1/2*a)^8 - 36*tan(1/2*b*x + 2*a)*tan(1/2*a)^5 - 2*tan(1/2*b
*x + 2*a)*tan(1/2*a)^3 - 27*tan(1/2*a)^4 + 6*tan(1/2*b*x + 2*a)*tan(1/2*a) - 12*tan(1/2*a)^2 + 1)/((tan(1/2*b*
x + 2*a)^2*tan(1/2*a)^6 - 15*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^4 + 12*tan(1/2*b*x + 2*a)*tan(1/2*a)^5 - tan(1/2*
a)^6 + 15*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^2 - 40*tan(1/2*b*x + 2*a)*tan(1/2*a)^3 + 15*tan(1/2*a)^4 - tan(1/2*b
*x + 2*a)^2 + 12*tan(1/2*b*x + 2*a)*tan(1/2*a) - 15*tan(1/2*a)^2 + 1)*(tan(1/2*a)^6 - 15*tan(1/2*a)^4 + 15*tan
(1/2*a)^2 - 1)) + log(abs(tan(1/2*b*x + 2*a)*tan(1/2*a)^3 - 3*tan(1/2*b*x + 2*a)*tan(1/2*a) + 3*tan(1/2*a)^2 -
 1)) - log(abs(3*tan(1/2*b*x + 2*a)*tan(1/2*a)^2 - tan(1/2*a)^3 - tan(1/2*b*x + 2*a) + 3*tan(1/2*a))))/b

________________________________________________________________________________________

maple [A]  time = 0.98, size = 36, normalized size = 1.29 \[ \frac {1}{4 b \cos \left (b x +a \right )}+\frac {\ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{4 b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(2*b*x+2*a)^2*sin(b*x+a),x)

[Out]

1/4/b/cos(b*x+a)+1/4/b*ln(csc(b*x+a)-cot(b*x+a))

________________________________________________________________________________________

maxima [B]  time = 0.35, size = 236, normalized size = 8.43 \[ \frac {4 \, \cos \left (2 \, b x + 2 \, a\right ) \cos \left (b x + a\right ) - {\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \relax (a) + \cos \relax (a)^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \relax (a) + \sin \relax (a)^{2}\right ) + {\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \relax (a) + \cos \relax (a)^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \relax (a) + \sin \relax (a)^{2}\right ) + 4 \, \sin \left (2 \, b x + 2 \, a\right ) \sin \left (b x + a\right ) + 4 \, \cos \left (b x + a\right )}{8 \, {\left (b \cos \left (2 \, b x + 2 \, a\right )^{2} + b \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, b \cos \left (2 \, b x + 2 \, a\right ) + b\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)^2*sin(b*x+a),x, algorithm="maxima")

[Out]

1/8*(4*cos(2*b*x + 2*a)*cos(b*x + a) - (cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*log(
cos(b*x)^2 + 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(a) + sin(a)^2) + (cos(2*b*x + 2*a)^2 +
 sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*log(cos(b*x)^2 - 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 + 2*s
in(b*x)*sin(a) + sin(a)^2) + 4*sin(2*b*x + 2*a)*sin(b*x + a) + 4*cos(b*x + a))/(b*cos(2*b*x + 2*a)^2 + b*sin(2
*b*x + 2*a)^2 + 2*b*cos(2*b*x + 2*a) + b)

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 26, normalized size = 0.93 \[ \frac {1}{4\,b\,\cos \left (a+b\,x\right )}-\frac {\mathrm {atanh}\left (\cos \left (a+b\,x\right )\right )}{4\,b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x)/sin(2*a + 2*b*x)^2,x)

[Out]

1/(4*b*cos(a + b*x)) - atanh(cos(a + b*x))/(4*b)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)**2*sin(b*x+a),x)

[Out]

Timed out

________________________________________________________________________________________